﻿using System;
using System.Windows.Data;
using Thor.Common;

namespace Thor.Silverlight
{
    public class ProviderAssemblyValueConverter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            ProviderAssembly providerAssembly = (ProviderAssembly)value;
            return providerAssembly.Name;
        }

        #endregion
    }
}
